package bar.dark.lee.setting;

import bar.dark.lee.R;
import bar.dark.lee.SuperActivity;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

public class TipsActivity extends SuperActivity implements OnClickListener
{
	public static final String TIP_REQUEST_KEY = "tip_request_key";
	
	public static final int TIP_MAIN = 0;
	public static final int TIP_INSERT = 1;
	public static final int TIP_SELECT = 2;
//	public static final int TIP_UPDATE = 2;
//	public static final int TIP_DELETE = 3;
	public static final int TIP_CASH = 4;
	public static final int TIP_CATEGORY = 5;
	public static final int TIP_AUTOBANK = 6;
	public static final int TIP_DATABANKUP = 7;
	public static final int TIP_AUTOMASSAGE = 8;
	public static final int TIP_MANAGER = 9;
	public static final int TIP_STATS = 10;
	public static final int TIP_FAN = 11;
	public static final int TIP_DEVELOPER = 12;
	public static final int TIP_PASSWORD = 13;
	public static final int TIP_AUTOMYBANK = 14;
	public static final int TIP_STARTDATE = 15;
	public static final int TIP_VIEWTYPE = 16;
	public static final int TIP_EXCEL = 17;
	public static final int TIP_BUDGET = 18;
	public static final int TIP_MEMO = 19;
	
	/** 메인 화면 */
	private View mainView;
	
	/** 가계부 입력 */
	private View insertView;
	
	/** 가계부 조회 */
	private View selectView;
	
	/** 가계부 수정 */
	private View updateView;
	
	/** 가계부 삭제 */
	private View deleteView;
	
	/** 현금 인출 */
	private View cashView;
	
	/** 카테고리 */
	private View categoryView;
	
	/** 통장 입출금 자동화 */
	private View autoBankView;
	
	/** 내통장 이체 자동화 */
	private View autoMyBankView;
	
	/** 데이터 복구 및 백업 */
	private View dataBankUpView;
	
	/** 문자 자동화 */
	private View autoMassageView;
	
	/** 월시작일 통화 */
	private View startDateView;
	
	/** 메인위젯 표시항목 */
	private View viewTypeView;
	
	/** 자산관리 */
	private View managerView;
	
	/** 통계 */
	private View statsView;
	
	/** 부채 */
	private View fanView;
	
	/** 개발자에게 */
	private View developerView;
	
	/** 비밀번호 */
	private View passwordView;
	
	/** 엑셀로 데이터 내보내기 */
	private View excelView;
	
	/** 예산 */
	private View budgetView;
	
	/** 예산 */
	private View memoView;
	
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		
		setGoneTipButton();
		
		setTitle("도움말");
		
		setContentView(R.layout.tips_activity);
		
		setFindView();
		setOnClickListener();
	}

	private void setFindView()
	{
		mainView = findViewById(R.id.tipsMainView);
		insertView = findViewById(R.id.tipsInsertView);
		selectView = findViewById(R.id.tipsSelectView);
//		updateView = findViewById(R.id.tipsUpdateView);
//		deleteView = findViewById(R.id.tipsDeleteView);
		cashView = findViewById(R.id.tipsCashView);
		categoryView = findViewById(R.id.tipsCategoryView);
		autoBankView = findViewById(R.id.tipsAutoBankView);
		autoMyBankView = findViewById(R.id.tipsAutoMyBankView);
		dataBankUpView = findViewById(R.id.tipsDataBankUpView);
		autoMassageView = findViewById(R.id.tipsAutoMassageView);
		startDateView = findViewById(R.id.tipsStartDateView);
		viewTypeView = findViewById(R.id.tipsViewTypeView);
		managerView = findViewById(R.id.tipsManagerView);
		statsView = findViewById(R.id.tipsStatsView);
		fanView = findViewById(R.id.tipsFanView);
		developerView = findViewById(R.id.tipsDeveloperView);
		passwordView = findViewById(R.id.tipsPasswordView);
		excelView = findViewById(R.id.tipsExcelView);
		budgetView = findViewById(R.id.tipsBudgetView);
		memoView = findViewById(R.id.tipsMemoView);
	}
	
	private void setOnClickListener()
	{
		mainView.setOnClickListener(this);
		insertView.setOnClickListener(this);
		selectView.setOnClickListener(this);
//		updateView.setOnClickListener(this);
//		deleteView.setOnClickListener(this);
		cashView.setOnClickListener(this);
		categoryView.setOnClickListener(this);
		autoBankView.setOnClickListener(this);
		autoMyBankView.setOnClickListener(this);
		dataBankUpView.setOnClickListener(this);
		autoMassageView.setOnClickListener(this);
		startDateView.setOnClickListener(this);
		viewTypeView.setOnClickListener(this);
		managerView.setOnClickListener(this);
		statsView.setOnClickListener(this);
		fanView.setOnClickListener(this);
		developerView.setOnClickListener(this);
		passwordView.setOnClickListener(this);
		excelView.setOnClickListener(this);
		budgetView.setOnClickListener(this);
		memoView.setOnClickListener(this);
	}
	
	@Override
	public void onClick(View v)
	{
		Intent intent = new Intent(this, TipInfoActivity.class);
		
		switch (v.getId())
		{
			case R.id.tipsMainView:
			{
				intent.putExtra(TIP_REQUEST_KEY, TIP_MAIN);
				break;
			}
			case R.id.tipsInsertView:
			{
				intent.putExtra(TIP_REQUEST_KEY, TIP_INSERT);
				break;
			}
			case R.id.tipsSelectView:
			{
				intent.putExtra(TIP_REQUEST_KEY, TIP_SELECT);
				break;
			}
//			case R.id.tipsUpdateView:
//			{
//				intent.putExtra(TIP_REQUEST_KEY, TIP_UPDATE);
//				break;
//			}
//			case R.id.tipsDeleteView:
//			{
//				intent.putExtra(TIP_REQUEST_KEY, TIP_DELETE);
//				break;
//			}
			case R.id.tipsCashView:
			{
				intent.putExtra(TIP_REQUEST_KEY, TIP_CASH);
				break;
			}
			
			case R.id.tipsCategoryView:
			{
				intent.putExtra(TIP_REQUEST_KEY, TIP_CATEGORY);
				break;
			}
			case R.id.tipsAutoBankView:
			{
				intent.putExtra(TIP_REQUEST_KEY, TIP_AUTOBANK);
				break;
			}
			case R.id.tipsAutoMyBankView:
			{
				intent.putExtra(TIP_REQUEST_KEY, TIP_AUTOMYBANK);
				break;
			}
			case R.id.tipsStartDateView:
			{
				intent.putExtra(TIP_REQUEST_KEY, TIP_STARTDATE);
				break;
			}
			case R.id.tipsViewTypeView:
			{
				intent.putExtra(TIP_REQUEST_KEY, TIP_VIEWTYPE);
				break;
			}
			case R.id.tipsDataBankUpView:
			{
				intent.putExtra(TIP_REQUEST_KEY, TIP_DATABANKUP);
				break;
			}
			case R.id.tipsAutoMassageView:
			{
				intent.putExtra(TIP_REQUEST_KEY, TIP_AUTOMASSAGE);
				break;
			}
			case R.id.tipsManagerView:
			{
				intent.putExtra(TIP_REQUEST_KEY, TIP_MANAGER);
				break;
			}
			case R.id.tipsStatsView:
			{
				intent.putExtra(TIP_REQUEST_KEY, TIP_STATS);
				break;
			}
			case R.id.tipsFanView:
			{
				intent.putExtra(TIP_REQUEST_KEY, TIP_FAN);
				break;
			}
			case R.id.tipsDeveloperView:
			{
				intent.putExtra(TIP_REQUEST_KEY, TIP_DEVELOPER);
				break;
			}
			case R.id.tipsPasswordView:
			{
				intent.putExtra(TIP_REQUEST_KEY, TIP_PASSWORD);
				break;
			}
			case R.id.tipsExcelView:
			{
				intent.putExtra(TIP_REQUEST_KEY, TIP_EXCEL);
				break;
			}
			case R.id.tipsBudgetView:
			{
				intent.putExtra(TIP_REQUEST_KEY, TIP_BUDGET);
				break;
			}
			case R.id.tipsMemoView:
			{
				intent.putExtra(TIP_REQUEST_KEY, TIP_MEMO);
				break;
			}
		}
		
		startActivity(intent);
	}

	@Override
	protected void tipButton()
	{
	}
}
